﻿using UnityEngine;
using System.Collections;

public class destroyClusters : MonoBehaviour {
	
	 GameObject[] gos;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		 gos = GameObject.FindGameObjectsWithTag("cluster");
		
		// foreach(GameObject gameObj in GameObject.FindObjectsOfType<GameObject>())
		
		//Debug.Log(gos.Length);
		if(gos.Length > 16){
			foreach(GameObject gosref in gos){
				//Destroy(gosref);
				
			}
		}
		
	
	}
}
